<%= form_for(@category, :html => {:class => 's-form'} ) do |f| %>
  <% if @category.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@category.errors.count, "error") %> prohibited this category from being saved:</h2>

      <ul>
      <% @category.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>
<!-- 
  <div class="field">
    <%= f.label :id %>
    <%= f.number_field :id %>
  </div>

-->
    <fieldset>
  <div class="field">
    <%= f.label :name %>
    <%= f.text_field :name %>
  </div>
  <div class="field">
    <%= f.label :parent_id %>
    <%= f.select("parent_id", Category.all.collect{|c| [c.name, c.id]}, { :include_blank => true, :prompt => true }) %>
  </div>
    </fieldset>
  <div class="actions">
    <%= f.submit  :class => 'gray-btn' %>
  </div>
<% end %>
